package com.example.customconsume.component;

import com.example.customconsume.component.chain.HandlerChain;
import com.example.customconsume.entity.ConsumeDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @Description 限额限次
 * @Author lihw
 * @Date 2024/7/10 11:35
 */
@Order(1)
@Component
@Slf4j
public class LimitCustomPayHandler implements CustomPayHandler<ConsumeDto>{

    // private static final Logger log = LoggerFactory.getLogger(LimitCustomPayHandler.class);


    @Override
    public ConsumeDto handleCustomPay(ConsumeDto consumeDto, HandlerChain handlerChain) {
        // todo 判断限额限次
        log.info("判断限额限次");
        handlerChain.doHandler(consumeDto);
        return consumeDto;
    }
}
